<?
require("config.php");

$show_backnav = "menu";
$location_status .= "| Enquire";


$menutype = 2;

if (NULL!=$action){

   $Query = "delete from $table where id=$id Limit 1";

   myQuery($Query);


   header("location:" . $rela_path . "share/msg.php?v=723");

   exit();

}


if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");
  
}

$Query = "select 
	code,
	name,
	email,
	phone,
	picture1,
	picture2,
	brief,
	details,
	status,
	publish_date,
	sex,
	duty,
	accept,
	email_alert,
	aorder
from $table where id='$id' Limit 1";
$r = myQuery($Query);




	$Code=		$r[0][0];
	$Name=	$r[0][1];
	$Email=	$r[0][2];
	$Phone=	$r[0][3];
	$Picture1=	$r[0][4];
	$Picture2=	$r[0][5];
	$Brief=	$r[0][6];
	$Details=	$r[0][7];
	$Status=	$r[0][8];
	$Publish_date=	$r[0][9];
	$Sex=	$r[0][10];
	$Duty=$r[0][11];
	$Accept=$r[0][12];
	$Email_alert=$r[0][13];
$aorder=$r[0][14];

require($rela_path . "inc/header.php");
require($rela_path . "bin/date.php");
?>

<!--Content Start-->
<form action="" method="post" enctype="multipart/form-data" name="form1">  
<!--hidden filed-->
<input name="id" type="hidden" value="<?print($id)?>">
<input name="action" type="hidden" value="delete">

  <table width="95%" border="0" align="center">
                      <tr> 
                        
      <td>&nbsp; </td>
                      </tr>
                      <tr> 
                        
      <td>
        <table border="0">
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td class="tdheader">Code :</td>
            <td> <?print($Code)?> </td>
          </tr>
          <tr> 
            <td class="tdheader">Name :</td>
            <td> <?echo $Name?>
            </td>
          </tr>

          <tr> 
            <td class="tdheader">Sex :</td>
            <td> <?echo $Sex?>
            </td>
          </tr>




          <tr> 
            <td class="tdheader">Status :</td>
            <td>
			
<?

if ($Duty=="0") {
	echo "Trainer";
}else{
	echo "Coach";
}


?>


            </td>
          </tr>




          <tr> 
            <td class="tdheader">Coaching Booking :</td>
            <td>
			
<?

if ($Accept=="0") {
	echo "Yes";
}else{
	echo "No";
}

?>


            </td>
          </tr>


          <tr> 
            <td class="tdheader">Booking Alert :</td>
            <td>
			
<?

if ($Email_alert=="1") {
	echo "Yes";
}else{
	echo "No";
}

?>


            </td>
          </tr>



          <tr> 
            <td class="tdheader">E-mail :</td>
            <td><?echo $Email?></td>
          </tr>
          <tr> 
            <td class="tdheader">Contact Phone :</td>
            <td><?echo $Phone?></td>
          </tr>




          <tr> 
            <td class="tdheader">Picture 1</td>
            <td>
			
			
			<!--<br><b>(Normal Picture)</b><br>-->
			<?loadImage($Picture1,$rela_path . $PIC_DIR . "$table/")?> 

			<br><b>(Smaller Picture)</b><br>
			<?loadSmallImage($Picture1,$rela_path . $PIC_DIR . "$table/")?>
			<br><br>


            </td>
          </tr>



          <tr> 
            <td class="tdheader">Picture 2</td>
            <td>
			
			
			<!--<br><b>(Normal Picture)</b><br>-->
			<?loadImage($Picture2,$rela_path . $PIC_DIR . "$table/")?> 

			<br><b>(Smaller Picture)</b><br>
			<?loadSmallImage($Picture2,$rela_path . $PIC_DIR . "$table/")?>
			<br><br>


            </td>
          </tr>













          <tr> 
            <td class="tdheader">Brief :</td>
            <td><?echo $Brief?></td>
          </tr>
          <tr> 
            <td class="tdheader">Details :</td>
            <td><?echo $Details?>
            </td>
          </tr>
          <tr> 
          <tr> 
            <td class="tdheader">Publish :</td>
            <td> <?echo $Status?>
			</td>
          </tr>
		  <tr> 
            <td class="tdheader">Publishing Date : </td>
            <td><?print(OutDate($Publish_date))?></td>
          </tr>
		  <tr>
        <td class="tdheader">Appearance Order: </td>
        <td>
          <?echo $aorder?>
        </td>
		    </tr>
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>

</form>
<!--Content End-->
<?require($rela_path . "inc/footer.php");?>
        